from selenium.webdriver.common.by import By

from Base.base_page import AppBasePage


class ChannelPage(AppBasePage):
    def __init__(self):
        super().__init__()
        self.concern = (By.XPATH, '//*[@content-desc="关注"]')
        self.tuijian = (By.XPATH, '//*[@content-desc="推荐"]')
        self.rebang = (By.XPATH, '//*[@content-desc="热榜"]')
        self.image = (By.XPATH, '//*[@content-desc="图片"]')
        self.sketch = (By.XPATH, '//*[@content-desc="短剧"]')
        self.hot_spot = (By.XPATH, '//*[@content-desc="热点"]')
    def to_channel_switching(self):
        self.click_element(self.find_element(self.concern))
        self.click_element(self.find_element(self.rebang))
        self.click_element(self.find_element(self.image))
        self.click_element(self.find_element(self.sketch))
        self.click_element(self.find_element(self.hot_spot))
        self.click_element(self.find_element(self.tuijian))
